// 导入axios
import service from '@/utils/request'

// 封装获取-部门列表接口/company/department
export function companyDepartmentRequest() {
  return service({
    method: 'get',
    url: '/company/department'
  })
}
// 封装获取-部门负责人接口/sys/user/simple
export function getSysUserRequest() {
  return service({
    method: 'get',
    url: '/sys/user/simple'
  })
}
// 封装新增-部门接口/company/department
export function setCompanyRequest(data) {
  return service({
    method: 'post',
    url: '/company/department',
    data
  })
}
// 封装删除-部门接口/company/department/{id}
export function deleteCompanyRequest(id) {
  return service({
    method: 'delete',
    url: `/company/department/${id}`
  })
}
// 封装修改-部门接口/company/department/{id}
export function updataCompanyRequest(data) {
  return service({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
// 获取部门-详细接口 /company/department/{id}
export function GetCompanyRequest(id) {
  return service({
    method: 'get',
    url: `/company/department/${id}`
  })
}
